#!/usr/bin/env/ python
# -*- coding: utf-8

"""
@project: python-file
@author: admin
@time: 2022/2/21
"""
import time

from selenium.webdriver.common.by import By
from unittestWeb.common.publicmethod import PublicMethod

class SitePage(PublicMethod):

	def title(self):
		'''首页'''
		self.click((By.XPATH, "//li[@data-id='index']"))

	def calendar(self):
		'''日程'''
		self.click((By.XPATH, "//li[@data-id='calendar']"))

	def bug(self):
		'''bug'''
		self.click((By.XPATH, "(//li[@data-id='bug'])[2]"))

	def testtask(self):
		'''测试'''
		self.click((By.XPATH, "(//li[@data-id='testtask'])[2]"))

	def dynamic(self):
		'''动态'''
		self.click((By.XPATH, "//li[@data-id='dynamic']"))

	def profile(self):
		'''档案'''
		self.click((By.XPATH, "//li[@data-id='profile']"))

	def changePassword(self):
		'''密码'''
		self.click((By.XPATH, "//li[@data-id='changePassword']"))
		time.sleep(1)
		self.click((By.XPATH, "//button[@data-dismiss='modal']"))

	def manageContacts(self):
		'''联系人'''
		self.click((By.XPATH, "//li[@data-id='manageContacts']"))